package com.qf.mapper;


import com.qf.dto.UserDto;
import com.qf.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created by jackiechan on 2021/6/7 15:32
 *
 * @author jackiechan
 */

public interface UserMapper {


    //@Select("SELECT * FROM users")
    // @SelectProvider(type = UserSqlProvider.class,method = "getQueryByNameAndStaus")
    List<User> findAllUsers(@Param("username") String username, @Param("status") int status);

    @Insert("INSERT INTO users(username,password,type,status) VALUE (#{username},#{password},#{type},#{status})")
    void addUser(UserDto userDto);


    int deleteByIds(@Param("ids") Integer[] ids);

    int updateUser(UserDto userDto);
}
